#include <stdio.h>
#include <stdlib.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include"head.h"
#define N 300
main(int argc,char *argv[])
{
    char ch[N];
    int i,fd,n;
    if ( (fd = open(argv[1], O_RDONLY)) == -1 )
        {
                perror(argv[1]);
                exit(1);
        }
    n=read(fd,ch,N);
    ihead(ch,n);
    close(fd);
}

